package cn.virens.web.components.beetl.fun;

import java.util.Objects;

import org.beetl.core.Context;
import org.beetl.core.Function;

public class FormSelectFunction implements Function {
	private static final String YES = "selected";
	private static final String NO = "";

	@Override
	public String call(Object[] paras, Context ctx) {
		if (paras == null || paras.length < 2) { return NO; }

		// 判断2个值是否一样
		return Objects.equals(paras[0], paras[1]) ? YES : NO;
	}

}
